package cn.kk.utils;

/**
 * ThreadLocal工具
 * @author kinoko
 */
public class ThreadLocalUtils {

    private final static ThreadLocal<Object> USER_THREAD_LOCAL = new ThreadLocal<>();

    /**
     * 设置数据到当前线程
     */
    public static void set(Object o){
        USER_THREAD_LOCAL.set(o);
    }

    /**
     * 获取线程中的数据
     * @return
     */
    public static Object get( ){
        return USER_THREAD_LOCAL.get();
    }

    /**
     * 删除线程中的数据
     */
    public static void remove(){
        USER_THREAD_LOCAL.remove();
    }
}